home *** CD-ROM | disk | FTP | other *** search
- ATARI MACHINE SPECIFIC LIBRARY
-
-
-
- NAME
- spr - a simple Sprite generator.
-
- SYNOPSIS
- spr {command}
-
- commands:
- D SPheight ImgW ImgH Set dimensions
- I imagefile Load image file
- S savefile Set sprite save file
- R #rotations Set # rotations
- s #incarnations New sprite
- r from hotx hoty Add n rotated incarnations
- m from hotx hoty Add shrunk incarnation
- d from hotx hoty Add direct incarnation
- a accuracy Set pixel subdivision
- f features Set current features
- (w=wide, f=fast)
-
- DESCRIPTION
- spr is a "batch" mode sprite creator. That is, you give it a
- description of everything you want, and it gives that back to
- you - it is not interactive... except that pressing any key
- during running will abort the program (rotations can take a
- LONG time).
-
- This mode of operation is particularly suited to the "makefile"
- concept.
-
- USAGE
- First, create some Degas or CrackArt picture files with the
- following format:
-
- Draw a 1-pixel-wide frame, outlining an area. (eg. a 32x32 pixel
- area)
-
- Draw you sprite either:
- - Magnified (eg. draw a 16x16 sprite in a 32x32 space)
- - Unmagnified (eg. draw a 16x16 sprite in a 16x16 space)
-
- Run spr. Some examples follow:
-
- spr f f I foo.pi1 D 2 16 2 S foo.spr s 1 m 0 8.0 1.0
-
- f f = Fast (ie. preshifted) sprites.
- I foo.pi1 = Use the source image file "foo.pi1".
- D 2 16 2 = Generate 2 pixel high sprites from
- 16x2 pixel framed images. (the width of the
- sprite will be 16, since "Wide" was not enabled
- with "f w").
- S foo.spr = Use the destination sprite file "foo.spr".
- s 1 = Start a new sprite, with 1 incarnation.
- m 0 8.0 1.0 = Add a magnified incarnation, using frame #0 in
- the source image file, with hotspot (8,1). Since
- the destination sprite size (16x2) is the same as
- the source image size (16x2), no actual magnification
- is done.
-
-
- spr a 8 I bar.ca1 R 64 D 16 32 32 S bar.spr s 320 r 0 8.0 8.0
- r 1 8.0 8.0 r 2 8.0 8.0 r 3 8.0 8.0 r 4 8.0 8.0
-
- a 8 = Use 8x pixel subdivision - accurate, but slow.
- I bar.ca1 = Use the source image file "bar.ca1".
- R 64 = Create 64 rotations in the "r" command.
- D 16 32 32 = Create 16 pixel high sprites from 32x32 pixel
- framed images. The width will be 16, since
- the wide feature was not enabled.
- S bar.spr = Use the destination sprite file "bar.spr".
- s 320 = Start a new sprite, with 320 incarnations.
- r 0 8.0 8.0 = Add (64, defined above) rotated incarnations,
- using framed #0 in the source image, with
- hotspot (8,8). Note that with rotations, the
- hotspot is rotated.
- r * 8.0 8.0 = add more rotated images.
-
- NOTES FOR MAKEFILES
- Remember that in makefiles, a "\" character at the end of the
- line allows more command-line to be added on the next line, so
- you may give quite large lists of commands to spr.
-
- FILES
- ".spr" is the recommended extension for AMS sprites.
-
- BUGS
- The "hotspot" definition may be confusing in that it is given
- in terms of the destination image, rather than the source.
-
- RGB comparisons are used to find "closest colour". Other, more
- theoretically correct methods exist - even HSL comparison may be
- better. But it works okay.
-
- AUTHOR
- Warwick Allison, 1992.
- warwick@cs.uq.oz.au
-
- COPYING
- This functionality is part of the Atari Machine Specific Library,
- and is Copyright 1992 by Warwick W. Allison.
-
- The Atari Machine Specific Library is free and protected under the
- GNU Library General Public License.
-
- You are free to copy and modify these sources, provided you acknowledge
- the origin by retaining this notice, and adhere to the conditions
- described in the GNU LGPL.
-